-- GENERATED SPELL FOR [Leprous Machinesmith] --


function spell0_6224(pUnit, Event) --@Supercharge,n/a--
pUnit:FullCastSpellOnTarget(10732,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6224', 10330, 1)
end

function spell1_6224(pUnit, Event) --@Throw Wrench,n/a--
pUnit:FullCastSpellOnTarget(13398,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6224', 674, 1)
end

function spell2_6224(pUnit, Event) --@Tune Up,n/a--
pUnit:FullCastSpellOnTarget(10348,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6224', 27000, 1)
end

function Sorts_6224(pUnit, Event)
local choix_sorts_6224 = math.random(0, 2)
if choix_sorts_6224 == 0 then
pUnit:RegisterEvent('spell0_6224', 1, 1)
end
if choix_sorts_6224 == 1 then
pUnit:RegisterEvent('spell1_6224', 1, 1)
end
if choix_sorts_6224 == 2 then
pUnit:RegisterEvent('spell2_6224', 1, 1)
end
end

function mob6224_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6224', math.random(1500, 3000), 1)
end

function mob6224_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6224_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6224_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6224, 1, 'mob6224_Action')
RegisterUnitEvent(6224, 2, 'mob6224_Leave')
RegisterUnitEvent(6224, 3, 'mob6224_Kill')
RegisterUnitEvent(6224, 4, 'mob6224_Die')
